{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests # 用于api http request\n",
    "# api使用请求参数\n",
    "key = 'ddbf84e30516af49ba00bd1afa61a233'\n",
    "def geo(address:str,city=None)-> dict:\n",
    "    parameters = {'key':key,\n",
    "                 'city':city,\n",
    "                 'citylimit': True,\n",
    "                 'address':address\n",
    "                 }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/geocode/geo?parameters\", params=parameters)\n",
    "    data = r.json()['geocodes'][0]['location']\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.679287,23.632575'"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "geo(\"广东省广州市从化区中山大学南方学院\",\"广州\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.632401,23.616941'"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "geo(\"广东省广州市从化区温泉镇政府\",\"广州\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "def car(origin,destination,sig=None)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/direction/driving?parameters'\n",
    "    params = {\n",
    "        'key':key,\n",
    "        'origin':origin,\n",
    "        'destination':destination,\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'route': {'origin': '113.679287,23.632575',\n",
       "  'destination': '113.632401,23.616941',\n",
       "  'taxi_cost': '29',\n",
       "  'paths': [{'distance': '9882',\n",
       "    'duration': '1015',\n",
       "    'strategy': '速度最快',\n",
       "    'tolls': '0',\n",
       "    'toll_distance': '0',\n",
       "    'steps': [{'instruction': '向南行驶213米右转',\n",
       "      'orientation': '南',\n",
       "      'distance': '213',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '80',\n",
       "      'polyline': '113.679596,23.632574;113.679596,23.632491;113.679596,23.632088;113.679601,23.631589;113.679605,23.630998;113.679605,23.630872;113.67964,23.630634',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '9',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679596,23.632574;113.679596,23.632491'},\n",
       "       {'lcode': [],\n",
       "        'distance': '44',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679596,23.632491;113.679596,23.632088'},\n",
       "       {'lcode': [],\n",
       "        'distance': '120',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679596,23.632088;113.679601,23.631589;113.679605,23.630998'},\n",
       "       {'lcode': [],\n",
       "        'distance': '40',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679605,23.630998;113.679605,23.630872;113.67964,23.630634'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向西行驶99米左转',\n",
       "      'orientation': '西',\n",
       "      'distance': '99',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '22',\n",
       "      'polyline': '113.67964,23.630634;113.679358,23.630516;113.679197,23.630469;113.678711,23.63036',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '48',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.67964,23.630634;113.679358,23.630516;113.679197,23.630469'},\n",
       "       {'lcode': [],\n",
       "        'distance': '51',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679197,23.630469;113.678711,23.63036'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向南行驶237米左转',\n",
       "      'orientation': '南',\n",
       "      'distance': '237',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '54',\n",
       "      'polyline': '113.678711,23.63036;113.678711,23.629336;113.678698,23.629128;113.678663,23.629054;113.678572,23.628984;113.67842,23.628898;113.678364,23.628837;113.678325,23.628772;113.678299,23.628646;113.678273,23.628372',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '113',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678711,23.63036;113.678711,23.629336'},\n",
       "       {'lcode': [],\n",
       "        'distance': '124',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678711,23.629336;113.678698,23.629128;113.678663,23.629054;113.678572,23.628984;113.67842,23.628898;113.678364,23.628837;113.678325,23.628772;113.678299,23.628646;113.678273,23.628372'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向南行驶498米右转',\n",
       "      'orientation': '南',\n",
       "      'distance': '498',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '98',\n",
       "      'polyline': '113.678273,23.628372;113.678572,23.628333;113.678689,23.628303;113.678845,23.628234;113.679045,23.628069;113.679162,23.62796;113.679214,23.627865;113.679236,23.627773;113.67928,23.627522;113.679288,23.627318;113.679249,23.626849;113.679184,23.626619;113.679136,23.626493;113.679002,23.62625;113.678937,23.626172;113.678707,23.625972;113.678615,23.625859;113.678529,23.625716;113.678507,23.625634;113.678433,23.625187;113.678424,23.625052;113.678455,23.624931;113.678572,23.624653',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '43',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678273,23.628372;113.678572,23.628333;113.678689,23.628303'},\n",
       "       {'lcode': [],\n",
       "        'distance': '62',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678689,23.628303;113.678845,23.628234;113.679045,23.628069;113.679162,23.62796'},\n",
       "       {'lcode': [],\n",
       "        'distance': '72',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679162,23.62796;113.679214,23.627865;113.679236,23.627773;113.67928,23.627522;113.679288,23.627318'},\n",
       "       {'lcode': [],\n",
       "        'distance': '321',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679288,23.627318;113.679249,23.626849;113.679184,23.626619;113.679136,23.626493;113.679002,23.62625;113.678937,23.626172;113.678707,23.625972;113.678615,23.625859;113.678529,23.625716;113.678507,23.625634;113.678433,23.625187;113.678424,23.625052;113.678455,23.624931;113.678572,23.624653'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿源富街途径源湖街向西南行驶2.4千米右转',\n",
       "      'orientation': '西南',\n",
       "      'road': '源富街',\n",
       "      'distance': '2352',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '246',\n",
       "      'polyline': '113.678572,23.624653;113.678555,23.624505;113.678411,23.624323;113.677578,23.623789;113.676528,23.623346;113.676354,23.623247;113.676263,23.623147;113.676102,23.62283;113.676037,23.622734;113.675786,23.622474;113.675499,23.62227;113.675412,23.62217;113.675378,23.622083;113.675373,23.621832;113.675391,23.621606;113.675438,23.621471;113.675538,23.621354;113.675764,23.621176;113.675851,23.621085;113.675898,23.62099;113.675911,23.620851;113.675868,23.62072;113.675786,23.620603;113.675742,23.620543;113.675595,23.620369;113.675239,23.620009;113.674931,23.619714;113.673919,23.61862;113.673689,23.618429;113.673459,23.618333;113.673216,23.618268;113.671081,23.617786;113.667895,23.617096;113.666341,23.616736;113.665916,23.616649;113.664549,23.616345;113.66355,23.61612;113.663225,23.616042;113.662569,23.615911;113.662027,23.615803;113.661684,23.615712;113.660404,23.615417',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '42',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678572,23.624653;113.678555,23.624505;113.678411,23.624323'},\n",
       "       {'lcode': [],\n",
       "        'distance': '435',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678411,23.624323;113.677578,23.623789;113.676528,23.623346;113.676354,23.623247;113.676263,23.623147;113.676102,23.62283;113.676037,23.622734;113.675786,23.622474;113.675499,23.62227;113.675412,23.62217;113.675378,23.622083;113.675373,23.621832'},\n",
       "       {'lcode': [],\n",
       "        'distance': '245',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.675373,23.621832;113.675391,23.621606;113.675438,23.621471;113.675538,23.621354;113.675764,23.621176;113.675851,23.621085;113.675898,23.62099;113.675911,23.620851;113.675868,23.62072;113.675786,23.620603;113.675742,23.620543;113.675595,23.620369;113.675239,23.620009'},\n",
       "       {'lcode': [],\n",
       "        'distance': '512',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.675239,23.620009;113.674931,23.619714;113.673919,23.61862;113.673689,23.618429;113.673459,23.618333;113.673216,23.618268;113.671081,23.617786'},\n",
       "       {'lcode': [],\n",
       "        'distance': '334',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.671081,23.617786;113.667895,23.617096'},\n",
       "       {'lcode': [],\n",
       "        'distance': '163',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.667895,23.617096;113.666341,23.616736'},\n",
       "       {'lcode': [],\n",
       "        'distance': '44',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.666341,23.616736;113.665916,23.616649'},\n",
       "       {'lcode': [],\n",
       "        'distance': '248',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.665916,23.616649;113.664549,23.616345;113.66355,23.61612'},\n",
       "       {'lcode': [],\n",
       "        'distance': '34',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.66355,23.61612;113.663225,23.616042'},\n",
       "       {'lcode': [],\n",
       "        'distance': '68',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.663225,23.616042;113.662569,23.615911'},\n",
       "       {'lcode': [],\n",
       "        'distance': '93',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.662569,23.615911;113.662027,23.615803;113.661684,23.615712'},\n",
       "       {'lcode': [],\n",
       "        'distance': '134',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.661684,23.615712;113.660404,23.615417'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿龙泉路向西北行驶1.7千米右转',\n",
       "      'orientation': '西北',\n",
       "      'road': '龙泉路',\n",
       "      'distance': '1723',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '172',\n",
       "      'polyline': '113.660404,23.615417;113.659996,23.615668;113.659089,23.616233;113.657161,23.617487;113.656979,23.617626;113.656814,23.617782;113.655833,23.618845;113.655681,23.618971;113.655543,23.619076;113.655417,23.619141;113.655278,23.619188;113.655082,23.619236;113.654744,23.619293;113.654514,23.619306;113.654323,23.619301;113.653971,23.619245;113.652891,23.61901;113.652721,23.618984;113.652569,23.618984;113.652426,23.619015;113.651819,23.61924;113.650816,23.619618;113.649362,23.619948;113.648819,23.620078;113.648355,23.620221;113.648086,23.620313;113.64786,23.620438;113.647617,23.620603;113.647378,23.620781;113.647183,23.620894;113.646966,23.620994;113.646476,23.621176;113.646319,23.621259;113.645868,23.621567;113.64572,23.621697',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '50',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.660404,23.615417;113.659996,23.615668'},\n",
       "       {'lcode': [],\n",
       "        'distance': '703',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.659996,23.615668;113.659089,23.616233;113.657161,23.617487;113.656979,23.617626;113.656814,23.617782;113.655833,23.618845;113.655681,23.618971;113.655543,23.619076;113.655417,23.619141;113.655278,23.619188;113.655082,23.619236;113.654744,23.619293;113.654514,23.619306'},\n",
       "       {'lcode': [],\n",
       "        'distance': '283',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.654514,23.619306;113.654323,23.619301;113.653971,23.619245;113.652891,23.61901;113.652721,23.618984;113.652569,23.618984;113.652426,23.619015;113.651819,23.61924'},\n",
       "       {'lcode': [],\n",
       "        'distance': '263',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.651819,23.61924;113.650816,23.619618;113.649362,23.619948'},\n",
       "       {'lcode': [],\n",
       "        'distance': '163',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.649362,23.619948;113.648819,23.620078;113.648355,23.620221;113.648086,23.620313;113.64786,23.620438'},\n",
       "       {'lcode': [],\n",
       "        'distance': '240',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.64786,23.620438;113.647617,23.620603;113.647378,23.620781;113.647183,23.620894;113.646966,23.620994;113.646476,23.621176;113.646319,23.621259;113.645868,23.621567'},\n",
       "       {'lcode': [],\n",
       "        'distance': '21',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.645868,23.621567;113.64572,23.621697'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿龙泉路向北行驶45米右转',\n",
       "      'orientation': '北',\n",
       "      'road': '龙泉路',\n",
       "      'distance': '45',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '13',\n",
       "      'polyline': '113.64572,23.621697;113.645725,23.621875;113.64582,23.622088',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '45',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.64572,23.621697;113.645725,23.621875;113.64582,23.622088'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿温泉大道向东北行驶1.5千米左转调头',\n",
       "      'orientation': '东北',\n",
       "      'road': '温泉大道',\n",
       "      'distance': '1514',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '118',\n",
       "      'polyline': '113.64582,23.622088;113.64625,23.622283;113.646632,23.622496;113.647222,23.622856;113.647695,23.623177;113.648069,23.623468;113.648763,23.624032;113.649093,23.62431;113.649566,23.624744;113.649818,23.624952;113.650052,23.625156;113.6502,23.625295;113.652743,23.627409;113.653598,23.628077;113.65441,23.628637;113.655273,23.629167;113.657509,23.630495',\n",
       "      'action': '左转调头',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '226',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.64582,23.622088;113.64625,23.622283;113.646632,23.622496;113.647222,23.622856;113.647695,23.623177'},\n",
       "       {'lcode': [],\n",
       "        'distance': '292',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.647695,23.623177;113.648069,23.623468;113.648763,23.624032;113.649093,23.62431;113.649566,23.624744;113.649818,23.624952'},\n",
       "       {'lcode': [],\n",
       "        'distance': '32',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.649818,23.624952;113.650052,23.625156'},\n",
       "       {'lcode': [],\n",
       "        'distance': '371',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.650052,23.625156;113.6502,23.625295;113.652743,23.627409'},\n",
       "       {'lcode': [],\n",
       "        'distance': '217',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.652743,23.627409;113.653598,23.628077;113.65441,23.628637'},\n",
       "       {'lcode': [],\n",
       "        'distance': '105',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.65441,23.628637;113.655273,23.629167'},\n",
       "       {'lcode': [],\n",
       "        'distance': '271',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.655273,23.629167;113.657509,23.630495'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿温泉大道向西南行驶3.0千米右转',\n",
       "      'orientation': '西南',\n",
       "      'road': '温泉大道',\n",
       "      'distance': '3037',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '172',\n",
       "      'polyline': '113.657426,23.63059;113.654336,23.628741;113.65385,23.628416;113.653598,23.628225;113.652674,23.627422;113.650165,23.625326;113.650022,23.625221;113.649766,23.625013;113.648924,23.624327;113.647843,23.623442;113.647361,23.62309;113.64678,23.622721;113.646345,23.622465;113.645981,23.622287;113.645595,23.622131;113.645117,23.621992;113.644709,23.621914;113.644375,23.621862;113.643255,23.621749;113.642578,23.621667;113.642474,23.621645;113.642027,23.621541;113.64145,23.621354;113.640525,23.621033;113.639332,23.620603;113.639184,23.620543;113.63885,23.620412;113.638433,23.620213;113.636046,23.618945;113.635543,23.618668;113.635252,23.618481;113.634748,23.618099;113.634518,23.617891;113.634262,23.617622;113.63398,23.61727;113.633633,23.61678;113.633056,23.615911',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '375',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.657426,23.63059;113.654336,23.628741'},\n",
       "       {'lcode': [],\n",
       "        'distance': '224',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.654336,23.628741;113.65385,23.628416;113.653598,23.628225;113.652674,23.627422'},\n",
       "       {'lcode': [],\n",
       "        'distance': '364',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.652674,23.627422;113.650165,23.625326;113.650022,23.625221'},\n",
       "       {'lcode': [],\n",
       "        'distance': '35',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.650022,23.625221;113.649766,23.625013'},\n",
       "       {'lcode': [],\n",
       "        'distance': '114',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.649766,23.625013;113.648924,23.624327'},\n",
       "       {'lcode': [],\n",
       "        'distance': '471',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.648924,23.624327;113.647843,23.623442;113.647361,23.62309;113.64678,23.622721;113.646345,23.622465;113.645981,23.622287;113.645595,23.622131;113.645117,23.621992'},\n",
       "       {'lcode': [],\n",
       "        'distance': '482',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.645117,23.621992;113.644709,23.621914;113.644375,23.621862;113.643255,23.621749;113.642578,23.621667;113.642474,23.621645;113.642027,23.621541;113.64145,23.621354;113.640525,23.621033'},\n",
       "       {'lcode': [],\n",
       "        'distance': '232',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.640525,23.621033;113.639332,23.620603;113.639184,23.620543;113.63885,23.620412;113.638433,23.620213'},\n",
       "       {'lcode': [],\n",
       "        'distance': '377',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.638433,23.620213;113.636046,23.618945;113.635543,23.618668;113.635252,23.618481'},\n",
       "       {'lcode': [],\n",
       "        'distance': '139',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.635252,23.618481;113.634748,23.618099;113.634518,23.617891;113.634262,23.617622'},\n",
       "       {'lcode': [],\n",
       "        'distance': '112',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.634262,23.617622;113.63398,23.61727;113.633633,23.61678'},\n",
       "       {'lcode': [],\n",
       "        'distance': '112',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.633633,23.61678;113.633056,23.615911'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向西北行驶96米右转',\n",
       "      'orientation': '西北',\n",
       "      'distance': '96',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '17',\n",
       "      'polyline': '113.633056,23.615911;113.632743,23.616102;113.632266,23.616389',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '38',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.633056,23.615911;113.632743,23.616102'},\n",
       "       {'lcode': [],\n",
       "        'distance': '58',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.632743,23.616102;113.632266,23.616389'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向北行驶68米到达目的地',\n",
       "      'orientation': '北',\n",
       "      'distance': '68',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '23',\n",
       "      'polyline': '113.632266,23.616389;113.632287,23.616541;113.632313,23.616688;113.632214,23.616897;113.632214,23.616936;113.632222,23.616975',\n",
       "      'action': [],\n",
       "      'assistant_action': '到达目的地',\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '17',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.632266,23.616389;113.632287,23.616541'},\n",
       "       {'lcode': [],\n",
       "        'distance': '51',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.632287,23.616541;113.632313,23.616688;113.632214,23.616897;113.632214,23.616936;113.632222,23.616975'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]}],\n",
       "    'restriction': '0',\n",
       "    'traffic_lights': '0'}]}}"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "car(geo(\"广东省广州市从化区中山大学南方学院\",\"广州\"),geo (\"广东省广州市从化区温泉镇政府\",\"广州\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
